<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGroundRegisterUserDetailBusinTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('ground_register_user_detail_busin', function (Blueprint $table) {
            $table->increments('id');
            $table->string('city_id',5)->comment('城市id');
            $table->string('shop_assistant_id',50)->comment('商户地推店员id');
            $table->string('shop_id',11)->comment('商户id');
            $table->string('salesman_id',15)->comment('个人地推id');
            $table->string('history_ground_id',20)->comment('个人地推id');
            $table->string('register_source',20)->comment('注册来源');
            $table->string('register_mobile',16)->comment('注册手机号');
            $table->integer('order_amount')->default(0)->comment('订单数量');
            $table->integer('ground_order_amount')->default(0)->comment('地推订单数量');
            $table->string('ground_type',5)->comment('地推类型1：个人地推 2：商家地推');
            $table->decimal('ground_order_activity_fee',16,2)->default(0.00)->comment('地推订单实付');
            $table->dateTime('register_date')->comment('注册时间');
            $table->string('register_status',20)->default(1)->comment('注册状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('ground_register_user_detail_busin');
    }
}
